feat(runtime): add flow-aware execution runtime#1173
feat(runtime): add flow-aware execution runtime#1173
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughIntroduces a runtime ChoiceExecutionContext and structured ChoiceExecutionResult/CommandExecutionResult models; adds flow-aware preflight traversal (collectChoiceFlowPreflight) that reports diagnostics and flow.choice metadata; centralizes Templater integration via IntegrationRegistry and FormatOrchestrator; threads execution context through executors, engines, and formatters; surfaces diagnostics and structured results in CLI handlers. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI Handler
participant Preflight as collectChoiceFlowPreflight
participant Executor as ChoiceExecutor
participant Engine as ChoiceEngine
participant Orchestrator as FormatOrchestrator
participant Templater as TemplaterIntegration
CLI->>Preflight: collectChoiceFlowPreflight(choice)
Preflight->>Preflight: traverse choices, collect requirements & diagnostics
Preflight->>Templater: inspect templates / check capabilities
Preflight-->>CLI: ChoiceFlowPreflightResult { requirements, unresolvedRequirements, diagnostics, choices }
CLI->>Executor: execute(choice)
Executor->>Executor: create/reuse ChoiceExecutionContext
Executor->>Engine: run(choice, executionContext)
Engine->>Orchestrator: parse/overwrite/wait/jump as needed
Orchestrator->>Templater: parseTemplate / overwriteFileOnce / wait / jump
Templater-->>Orchestrator: capability/result
Engine-->>Executor: ChoiceExecutionResult { status, artifacts, diagnostics, error? }
Executor-->>CLI: mapped CLI response (ok/aborted/failed + diagnostics/flow)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying quickadd with
|
| Latest commit: |
a5d5cfc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://02a3f5fc.quickadd.pages.dev |
| Branch Preview URL: | https://codex-flow-runtime-review-fi.quickadd.pages.dev |
daef0eb to
7dec0eb
Compare
Add a shared flow-aware execution runtime across QuickAdd engines and isolate Templater integration behind an explicit capability boundary.
This introduces runtime execution context/result/diagnostic/artifact models, threads shared flow state through macro/capture/template execution, and moves Templater probing into
src/integrations/*instead of scattering duck-typed checks through engine code. It also includes the follow-up fixes from review validation: non-interactive CLI runs now use whole-flow preflight, CLI/API callers honorChoiceExecutionResultfailure states, and Templater diagnostics are gated to meaningful cases.This work was done because the existing execution model treated too much behavior as isolated string transforms, which made nested flow execution hard to reason about and made Templater integration brittle. The follow-up fixes make the new runtime safer at the boundaries without changing persisted choice schemas.
Focus review on
src/engine/runtime/*,src/integrations/*,src/choiceExecutor.ts, the engine/runtime callers, and the CLI/preflight/API boundary changes. No persisted schema migration is included.Summary by CodeRabbit
New Features
Documentation